package edu.hitsz.application;

import java.awt.*;
import java.text.DecimalFormat;

/**
 * 困难模式
 * 有Boss敌机，每次召唤增加Boss机500血量
 * 难度会随着时间增加，敌机的血量、射击周期、产生频率变化，变化速度比普通模式快
 * 游戏界面中出现的敌机数量的最大值为10
 * 精英敌机的初始产生概率为0.3
 * Boss机产生的分数阈值为200
 * 道具产生的初始概率为0.6
 */
public class HardGame extends Game{
    public HardGame() {
        super();
        BACKGROUND_IMAGE = ImageManager.BACKGROUND_IMAGE3;
        enemyMaxNumber = 10;
        probability = 0.6;
        eliteProbability = 0.5;
        enemyDuration = 800;
        enemyBulletDuration = 800;
        bossScoreThreshold = 200;
        createBoss = true;
        createdifficulty = 3000;
    }

    @Override
    public void createBoss() {
        super.createBoss();
        BossHp += 500;
    }

    @Override
    public void increaseddifficulty() {
        DecimalFormat format = new DecimalFormat("#0.00");
        if (time % createdifficulty == 0) {
            eliteProbability += 0.01;
            probability -= 0.01;
            enemyDuration -= 10;
            enemyBulletDuration -= 10;
            magnification += 0.1;
            System.out.println("提高难度！精英机概率：" + format.format(eliteProbability) + "，道具产生概率：" + format.format(probability) + "，敌机产生频率：" + enemyDuration + "，子弹发射的频率：" + enemyBulletDuration + "，敌机属性提升倍率：" + format.format(magnification));
        }
    }
}
